import request from "@/config/utils/request";
import { loadingParams } from "@/basa/utils/public";

// 选择原仓库
export function listScWarehouse(data) {
    return request({
        url: "/apis/smp/scwarehouse/listScWarehouse",
        method: "POST",
        data
    });
}

//选择库存
export function listSmpStockForInventoryPage(data) {
    return request({
        url: "/apis/smp/smpstock/listSmpStockForMovePage",
        method: "POST",
        data: { ...data, ...loadingParams },
    });
}

// 新增保存
export function saveSmpMoveInventory(data) {
    return request({
        url: "/apis/smp/moveinventory/saveMoveInventory",
        method: "POST",
        data: { ...data, ...loadingParams },
    });
}

//   暂存
export function tsMoveInventory(data) {
    return request({
        url: "/apis/smp/moveinventory/tsMoveInventory",
        method: "POST",
        data: { ...data, ...loadingParams },
    });
}
//   列表
export function listPageMoveInventory(data) {
    return request({
        url: "/apis/smp/moveinventory/listPageMoveInventory",
        method: "POST",
        data: { ...data, ...loadingParams },
    });
}

//   删除
export function removeMoveInventory(data) {
    return request({
        url: "/apis/smp/moveinventory/removeMoveInventory",
        method: "POST",
        data,
    });
}
//   撤回
export function recallMoveInventory(data) {
    return request({
        url: "/apis/smp/moveinventory/recallMoveInventory",
        method: "POST",
        data,
    });
}

//   编辑
export function getSmpMoveInventoryById(data) {
    return request({
        url: "/apis/smp/moveinventory/getMoveInventory",
        method: "POST",
        data,
    });
}

// 编辑保存提交
export function editSmpMoveInventory(data) {
    return request({
        url: "/apis/smp/moveinventory/editMoveInventory",
        method: "POST",
        data,
    });
}